home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / complib / sggqrf.z / sggqrf
Text File  |  1998-10-30  |  6KB  |  199 lines

  1.  
  2.  
  3.  
  4. SSSSGGGGGGGGQQQQRRRRFFFF((((3333FFFF))))                                                          SSSSGGGGGGGGQQQQRRRRFFFF((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SGGQRF - compute a generalized QR factorization of an N-by-M matrix A and
  10.      an N-by-P matrix B
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      SUBROUTINE SGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK, LWORK, INFO
  14.                         )
  15.  
  16.          INTEGER        INFO, LDA, LDB, LWORK, M, N, P
  17.  
  18.          REAL           A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ), WORK(
  19.                         * )
  20.  
  21. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  22.      SGGQRF computes a generalized QR factorization of an N-by-M matrix A and
  23.      an N-by-P matrix B:
  24.  
  25.                  A = Q*R,        B = Q*T*Z,
  26.  
  27.      where Q is an N-by-N orthogonal matrix, Z is a P-by-P orthogonal matrix,
  28.      and R and T assume one of the forms:
  29.  
  30.      if N >= M,  R = ( R11 ) M  ,   or if N < M,  R = ( R11  R12 ) N,
  31.                      (  0  ) N-M                         N   M-N
  32.                         M
  33.  
  34.      where R11 is upper triangular, and
  35.  
  36.      if N <= P,  T = ( 0  T12 ) N,   or if N > P,  T = ( T11 ) N-P,
  37.                       P-N  N                           ( T21 ) P
  38.                                                           P
  39.  
  40.      where T12 or T21 is upper triangular.
  41.  
  42.      In particular, if B is square and nonsingular, the GQR factorization of A
  43.      and B implicitly gives the QR factorization of inv(B)*A:
  44.  
  45.                   inv(B)*A = Z'*(inv(T)*R)
  46.  
  47.      where inv(B) denotes the inverse of the matrix B, and Z' denotes the
  48.      transpose of the matrix Z.
  49.  
  50.  
  51. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  52.      N       (input) INTEGER
  53.              The number of rows of the matrices A and B. N >= 0.
  54.  
  55.      M       (input) INTEGER
  56.              The number of columns of the matrix A.  M >= 0.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSGGGGGGGGQQQQRRRRFFFF((((3333FFFF))))                                                          SSSSGGGGGGGGQQQQRRRRFFFF((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      P       (input) INTEGER
  75.              The number of columns of the matrix B.  P >= 0.
  76.  
  77.      A       (input/output) REAL array, dimension (LDA,M)
  78.              On entry, the N-by-M matrix A.  On exit, the elements on and
  79.              above the diagonal of the array contain the min(N,M)-by-M upper
  80.              trapezoidal matrix R (R is upper triangular if N >= M); the
  81.              elements below the diagonal, with the array TAUA, represent the
  82.              orthogonal matrix Q as a product of min(N,M) elementary
  83.              reflectors (see Further Details).
  84.  
  85.      LDA     (input) INTEGER
  86.              The leading dimension of the array A. LDA >= max(1,N).
  87.  
  88.      TAUA    (output) REAL array, dimension (min(N,M))
  89.              The scalar factors of the elementary reflectors which represent
  90.              the orthogonal matrix Q (see Further Details).  B
  91.              (input/output) REAL array, dimension (LDB,P) On entry, the N-by-P
  92.              matrix B.  On exit, if N <= P, the upper triangle of the subarray
  93.              B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T; if
  94.              N > P, the elements on and above the (N-P)-th subdiagonal contain
  95.              the N-by-P upper trapezoidal matrix T; the remaining elements,
  96.              with the array TAUB, represent the orthogonal matrix Z as a
  97.              product of elementary reflectors (see Further Details).
  98.  
  99.      LDB     (input) INTEGER
  100.              The leading dimension of the array B. LDB >= max(1,N).
  101.  
  102.      TAUB    (output) REAL array, dimension (min(N,P))
  103.              The scalar factors of the elementary reflectors which represent
  104.              the orthogonal matrix Z (see Further Details).  WORK
  105.              (workspace/output) REAL array, dimension (LWORK) On exit, if INFO
  106.              = 0, WORK(1) returns the optimal LWORK.
  107.  
  108.      LWORK   (input) INTEGER
  109.              The dimension of the array WORK. LWORK >= max(1,N,M,P).  For
  110.              optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3), where
  111.              NB1 is the optimal blocksize for the QR factorization of an N-
  112.              by-M matrix, NB2 is the optimal blocksize for the RQ
  113.              factorization of an N-by-P matrix, and NB3 is the optimal
  114.              blocksize for a call of SORMQR.
  115.  
  116.      INFO    (output) INTEGER
  117.              = 0:  successful exit
  118.              < 0:  if INFO = -i, the i-th argument had an illegal value.
  119.  
  120. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  121.      The matrix Q is represented as a product of elementary reflectors
  122.  
  123.         Q = H(1) H(2) . . . H(k), where k = min(n,m).
  124.  
  125.      Each H(i) has the form
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SSSSGGGGGGGGQQQQRRRRFFFF((((3333FFFF))))                                                          SSSSGGGGGGGGQQQQRRRRFFFF((((3333FFFF))))
  137.  
  138.  
  139.  
  140.         H(i) = I - taua * v * v'
  141.  
  142.      where taua is a real scalar, and v is a real vector with
  143.      v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i+1:n,i), and
  144.      taua in TAUA(i).
  145.      To form Q explicitly, use LAPACK subroutine SORGQR.
  146.      To use Q to update another matrix, use LAPACK subroutine SORMQR.
  147.  
  148.      The matrix Z is represented as a product of elementary reflectors
  149.  
  150.         Z = H(1) H(2) . . . H(k), where k = min(n,p).
  151.  
  152.      Each H(i) has the form
  153.  
  154.         H(i) = I - taub * v * v'
  155.  
  156.      where taub is a real scalar, and v is a real vector with
  157.      v(p-k+i+1:p) = 0 and v(p-k+i) = 1; v(1:p-k+i-1) is stored on exit in
  158.      B(n-k+i,1:p-k+i-1), and taub in TAUB(i).
  159.      To form Z explicitly, use LAPACK subroutine SORGRQ.
  160.      To use Z to update another matrix, use LAPACK subroutine SORMRQ.
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.